package com.github.common.extend.demo.config.json;

import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.github.common.extend.demo.config.json.jaskson.sensitive.SensitiveInfoSerialize;
import com.github.common.extend.demo.config.json.jaskson.sensitive.SensitiveType;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
 *  jackson框架序列化的时候数据加密
 * @author X1993
 * @date 2022/08/12
 * @description
 */
@Retention(RetentionPolicy.RUNTIME)
@JacksonAnnotationsInside
@JsonSerialize(using = SensitiveInfoSerialize.class)
public @interface SensitiveInfo {

    SensitiveType value() default SensitiveType.DEFAULT;

}